<?php
/**
 * Description of formText
 *
 * @author dll_hell_2
 */
class formText extends labeledFormItem
{
    protected $value;
    public function __construct($name, $label = NULL, $value = NULL) {
        parent::__construct($name, $label);
        if(isset($value))
            $this->value = $value;
        else
            $this->value = '';
    }
    public function __toString()
    {
        $result = "";
        $result = parent::__toString();//mozna label
        if(isset($this->value))
            $text = sprintf("value=\"%s\"",
                    $this->value);  
        $result .= sprintf("<input type=\"text\" name=\"%s\" %s />",
                $this->name,
                $text);
        return $result;
    }
}

?>
